<%@page language="java" contentType="text/html;charset=UTF-8"%>
<%@include file="/WEB-INF/core/common/top.jsp" %>
<%@taglib prefix="s" uri="/struts-tags"%>
<link type="text/css" rel="stylesheet" href="${ctx}/core/styles/validatorAuto.css" />
<script src="${ctx}/core/scripts/jquery_last.js" type="text/javascript" charset="UTF-8"></script>
<script src="${ctx}/core/scripts/formValidator.js" type="text/javascript" charset="UTF-8"></script>
<script src="${ctx}/core/scripts/formValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>

<script language="javascript">
<!--

 	<s:if test='"captionfailed".equals(result)'>
	     window.opener.alertCaptionError();
	     window.close();
 	</s:if>
 	<s:elseif test='"captionsuccess".equals(result)'>
		  window.opener.delayFlesh(5);
		  window.close();
 	</s:elseif>
    function doSubmit(){
          var filename = document.getElementById('filename').value;
          if(filename==null||filename==''||filename.length<1){
            alert("<s:text name='select.caption.file'/>");
          }else{
		      var form = document.getElementById('form0');
		      form.action = 'contentCaption.action';
		      form.submit();

          }

    }

	
	function doCancel(){
		location='${ctx}/contentManage/contentCaption.action?act=reQuery';
	}
//-->
</script>

<body style="overflow-x:hidden;overflow-y:auto;" >
<form method="post" action="${ctx}/contentManage/contentCaption.action" name="form0" id="form0" enctype="multipart/form-data">
<s:hidden name="act" value="monitorCaptionImport"/>
<s:hidden name="contentId" value="%{contentId}"/>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<%@include file="/WEB-INF/core/common/message.jsp"  %>
   <tr>
    <td width="8"><img src="${ctx}/core/images/button_05.gif" width="8" height="27" /></td>
    <td width="99%" align="left" valign="middle" background="${ctx}/core/images/button_06.gif" class="bluecu">&nbsp;<img src="${ctx}/core/images/icon_04.gif" />&nbsp;<s:text name="caption.import"/></td>
    <td width="8"><img src="${ctx}/core/images/button_07.gif" width="8" height="27" /></td>
  </tr>

  <tr>
    <td colspan="4" class="biaoge">
         <table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF">
               <tr bgcolor="#DDE4EA" height="30">
                <td colspan="4" align="right">
<s:text name="caption.template"/>&nbsp;<a href="${ctx}/templates/download.jsp?fileid=Caption_<s:property value='language'/>.srt">Caption_<s:property value='language'/>.srt</a>&nbsp;&nbsp;
				</td>
				 </tr>         
                 <tr align="left">
                 	  <td width="10%" bgcolor="#DDE4EA"  height="30">&nbsp;<s:text name="metadata.contid"/></td>
                      <td width="20%" bgcolor="#DDE4EA">
					  		&nbsp;<s:property value="content.contid"/>
					  </td>
                      <td width="10%" bgcolor="#DDE4EA" >&nbsp;<s:text name="metadata.title"/></td>
                      <td bgcolor="#DDE4EA">
                      		&nbsp;<s:property value="content.title"/>
					  </td>
                 </tr>
                 <tr align="left">
                 	  <td  bgcolor="#DDE4EA"  height="30">&nbsp;<s:text name="caption.import"/>&nbsp;<font color="red">*</font></td>
							<td colspan="3" bgcolor="#DDE4EA" >
                					<div style="padding:0px;margin:0px;padding-left:6px;padding-top:1px;">
                								<ul style="padding:0px;margin:0px;list-style-type:none;">
                									<li style="float:left;display:inline;height:20px;">
                									<input name="filename" type="text" size="65" value="" id="filename" readonly="readonly">
                									</li>
                									<li style="float:left;display:inline;padding-left:10px;padding-top:2px;height:22px;overflow:hidden;"> 
			                							<div id="fakeButton" class="btn" style="width: 75px; height: 20px;padding-top:1px;"><s:text name="button.file"/></div>
														<input name="captionFile" type="file" style="width: 67px; height: 20px;  filter: alpha(opacity =   0);  position: relative; top: -20px;left:-6px" onchange="this.form.filename.value=this.value;">
													</li>
												</ul>
									</div> 
							</td>						  
                 </tr>                            
                 <tr>
                      <td height="10" colspan="4" background="../core/images/line5.gif">&nbsp;</td>
                 </tr>
                 <tr>
                      <td height="25" colspan="4" align="center">
							<input name="button22" id="submitButton" onClick="doSubmit()" type="button" class="btn" value=" <s:text name='button.save'/> "/>
			           </td>
                 </tr>
             </table>
            </td>
          </tr>
    </table>
   </form>
</body>
